home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1996 #15 / Monster Media Number 15 (Monster Media)(July 1996).ISO / bbs_util / bsrc_260.zip / INCLUDE.ZIP / FAXPROTO.H < prev    next >
C/C++ Source or Header  |  1996-02-20  |  7KB  |  184 lines

  1. /*--------------------------------------------------------------------------*/
  2. /*                                                                          */
  3. /*                                                                          */
  4. /*      ------------         Bit-Bucket Software, Co.                       */
  5. /*      \ 10001101 /         Writers and Distributors of                    */
  6. /*       \ 011110 /          Freely Available<tm> Software.                 */
  7. /*        \ 1011 /                                                          */
  8. /*         ------                                                           */
  9. /*                                                                          */
  10. /*              (C) Copyright 1987-96, Bit Bucket Software Co.              */
  11. /*                                                                          */
  12. /*             This header file was written by Michael Buenter              */
  13. /*                                                                          */
  14. /*                     Fax definitions for BinkleyTerm                      */
  15. /*                                                                          */
  16. /*                                                                          */
  17. /*    For complete  details  of the licensing restrictions, please refer    */
  18. /*    to the License  agreement,  which  is published in its entirety in    */
  19. /*    the MAKEFILE and BT.C, and also contained in the file LICENSE.260.    */
  20. /*                                                                          */
  21. /*    USE  OF THIS FILE IS SUBJECT TO THE  RESTRICTIONS CONTAINED IN THE    */
  22. /*    BINKLEYTERM  LICENSING  AGREEMENT.  IF YOU DO NOT FIND THE TEXT OF    */
  23. /*    THIS  AGREEMENT IN ANY OF THE  AFOREMENTIONED FILES,  OR IF YOU DO    */
  24. /*    NOT HAVE THESE FILES,  YOU  SHOULD  IMMEDIATELY CONTACT BIT BUCKET    */
  25. /*    SOFTWARE CO.  AT ONE OF THE  ADDRESSES  LISTED BELOW.  IN NO EVENT    */
  26. /*    SHOULD YOU  PROCEED TO USE THIS FILE  WITHOUT HAVING  ACCEPTED THE    */
  27. /*    TERMS  OF  THE  BINKLEYTERM  LICENSING  AGREEMENT,  OR  SUCH OTHER    */
  28. /*    AGREEMENT AS YOU ARE ABLE TO REACH WITH BIT BUCKET SOFTWARE, CO.      */
  29. /*                                                                          */
  30. /*                                                                          */
  31. /* You can contact Bit Bucket Software Co. at any one of the following      */
  32. /* addresses:                                                               */
  33. /*                                                                          */
  34. /* Bit Bucket Software Co.        FidoNet  1:104/501, 1:343/491             */
  35. /* P.O. Box 460398                AlterNet 7:42/1491                        */
  36. /* Aurora, CO 80046               BBS-Net  86:2030/1                        */
  37. /*                                Internet f491.n343.z1.fidonet.org         */
  38. /*                                                                          */
  39. /* Please feel free to contact us at any time to share your comments about  */
  40. /* our software and/or licensing policies.                                  */
  41. /*                                                                          */
  42. /*--------------------------------------------------------------------------*/
  43.  
  44. /* Constants for Class 2 commands */
  45.  
  46. /* exit codes  */
  47.  
  48. #define FAXSENT        0
  49. #define FAXINSYNC    0
  50. #define FAXNOSYNC    1
  51. #define FAXNODIAL    2
  52. #define FAXBUSY        3
  53. #define FAXHANG        4
  54. #define FAXERROR    5
  55.  
  56. /* My own page reception codes */
  57.  
  58. #define PAGE_GOOD            0
  59. #define ANOTHER_DOCUMENT    1
  60. #define END_OF_DOCUMENT        2
  61. #define PAGE_HANGUP            4
  62. #define PAGE_ERROR            5
  63.  
  64. /********************************************************/
  65. /* Class 2 session parameters                           */
  66.  
  67. /* Set desired transmission params with +FDT=DF,VR,WD,LN
  68.  * DF = Data Format :   0  1-d huffman
  69.  *                      *1 2-d modified Read
  70.  *                      *2 2-d uncompressed mode
  71.  *                      *3 2-d modified modified Read
  72.  *
  73.  * VR = Vertical Res :  0 Normal, 98 lpi
  74.  *                      1 Fine, 196 lpi
  75.  *
  76.  * WD = width :         0  1728 pixels in 215 mm
  77.  *                      *1 2048 pixels in 255 mm
  78.  *
  79.  * LN = page length :   0 A4, 297 mm
  80.  *                      1 B4, 364 mm
  81.  *                      2  Unlimited
  82.  *
  83.  * EC = error correction :      0 disable ECM
  84.  *
  85.  * BF = binary file transfer :  0 disable BFT
  86.  *
  87.  * ST = scan time/line :        VR = normal     VR = fine
  88.  *                         0    0 ms            0 ms
  89.  *
  90.  */
  91.  
  92. /* data format */
  93.  
  94. #define DF_1DHUFFMAN    0
  95. #define DF_2DMREAD        1
  96. #define DF_2DUNCOMP        2
  97. #define DF_2DMMREAD        3
  98.  
  99. /* vertical resolution */
  100.  
  101. #define VR_NORMAL        0
  102. #define VR_FINE            1
  103.  
  104. /* width */
  105.  
  106. #define WD_1728            0
  107. #define WD_2048            1
  108.  
  109. /* page length */
  110.  
  111. #define LN_A4            0
  112. #define LN_B4            1
  113. #define LN_UNLIMITED    2
  114.  
  115. /* Baud rate */
  116.  
  117. #define BR_2400            0
  118. #define BR_4800            1
  119. #define BR_7200            2
  120. #define BR_9600            3
  121.  
  122. /* A T.30 DIS frame, as sent by the remote fax machine */
  123.  
  124. struct T30Params
  125. {
  126.     int vr;                            /* VR = Vertical Res :             */
  127.                                     /*     0 Normal, 98 lpi            */
  128.                                     /*     1 Fine, 196 lpi             */
  129.  
  130.     int br;                            /* BR = Bit Rate :    br * 2400BPS */
  131.  
  132.     int wd;                            /* Page Width :                    */
  133.                                     /*     0 1728 pixels in 215 mm     */
  134.                                     /*     1 2048 pixels in 255 mm     */
  135.                                     /*     2 2432 pixels in 303 mm     */
  136.  
  137.     int ln;                            /* Page Length :                   */
  138.                                     /*     0 A4, 297 mm                */
  139.                                     /*     1 B4, 364 mm                */
  140.                                     /*     2 unlimited                 */
  141.  
  142.     int df;                            /* Data compression format :       */
  143.                                     /*     0 1-D modified Huffman      */
  144.                                     /*     1 2-D modified ReAd         */
  145.                                     /*     2 2-D unompressed mode (?)  */
  146.  
  147.     int ec;                            /* Error Correction :              */
  148.                                     /*     0 disable ECM               */
  149.                                     /*     1 enable ECM 64 bytes/frame */
  150.                                     /*     2 enable CM 256B/frame      */
  151.  
  152.     int bf;                            /* Binary File Transfer            */
  153.                                     /*     0 disable BFT               */
  154.                                     /*     1 enable BFT                */
  155.  
  156.     int st;                            /* Scan Time (ms) :                */
  157.                                     /*     VR   Normal  Fine           */
  158.                                     /*     0    0       0 ms           */
  159.                                     /*     1    5       5              */
  160.                                     /*     2    10      5              */
  161.                                     /*     3    10      10             */
  162.                                     /*     4    20      10             */
  163.                                     /*     5    20      20             */
  164.                                     /*     6    40      20             */
  165.                                     /*     7    40      40             */
  166. };
  167.  
  168. struct faxmodem_response
  169. {
  170.     char remote_id[50];                /* +FCSI remote id      */
  171.     int hangup_code;                /* +FHNG code           */
  172.     int post_page_response_code;    /* +FPTS code           */
  173.     int post_page_message_code;        /* +FET code            */
  174.     int fcon;                        /* Boolean; TRUE if +FCON  seen */
  175.     int connect;                    /* Boolean; TRUE if CONNECT msg seen */
  176.     int ok;                            /* Boolean; TRUE if OK seen */
  177.     int error;                        /* Boolean; TRUE if ERROR or NO CARRIER seen */
  178.  
  179.     /* Session params; parsed from +FDCS */
  180.  
  181.     struct T30Params T30;
  182. };
  183.  
  184.